<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_users
 * @copyright	Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @since		1.5
 */
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
$error = JRequest::getVar('error');
?>

<h2 class="titlepage">Log ind</h2>
<div class="eachBox page-login-box clearfix">
    <div class="cont-box login-content clearfix">
        <?php if(isset($_GET['error'])){?>
        <p style="color:red;">Du har indtastet et forkert brugernavn eller adgangskode.</p>
        <?php }?>
        <h6>Eksisterende bruger</h6>
        <form action="<?php echo JRoute::_('index.php'); ?>" method="post" id="login-form" class="f-login" >
        <p>Indtast din e-mail</p>
        <input class="txtip" type="text" id="modlgn-username" name="username">
        <p>Adgangskode</p>
        <input class="txtip" id="modlgn-passwd" type="password" name="password" value="">
        <div class="line-under-f clearfix">
            <label>
                <input id="modlgn-remember" type="checkbox" name="remember" class="ck"/>Husk mig
            </label>
            <a class="btnlink-forget" href="<?php echo JRoute::_('index.php?option=com_users&view=reset')?>">Har du glemt dit kodeord, tryk her >></a> </div>
        <div class="wrap-btn-pp clearfix">
            <div class="bt-line clearfix"><a class="btnYellow btnLogin" onclick="$('#login-form').submit();" href="javascript:void(0);">Log ind</a></div>
            <a class="btnGreen" href="<?php echo JRoute::_('index.php?option=com_users&view=registration')?>">OPRET NY BRUGER, TRYK HER >></a> </div>
        <input  type="submit" style="position: absolute; left:-9999px"/>
        <input type="hidden" name="option" value="com_users" />
        <input type="hidden" name="task" value="user.login" />
        <input type="hidden" name="return" value="<?php echo $return; ?>" />
        <?php echo JHtml::_('form.token'); ?>
        </form>
    </div>
    <!-- cont-box--> 
</div>
<?php return;?>

<div class="wrapper">
    <div class="content" id="how-page">
        <div class="col-wrapper clearfix col-box" style="min-height:300px">
            <?php if($msg){?>
            <div style="background-color: #e6c0c0; color: #c00; border-top: 3px solid #DE7A7B; border-bottom: 3px solid #DE7A7B; padding-left: 1em; font-weight: bold;">
                <div style="margin: .4em 0 .5em 0;line-height: 1.5em;">Nulstilling af adgangskode gennemført. Du kan nu logge på webstedet</div>
            </div>
            <?php }?>
            <div class="f-login clearfix">
                <form id="com-login" action="<?php echo JRoute::_('index.php?option=com_users&task=user.login'); ?>" method="post">
                    <fieldset>
                        <?php foreach ($this->form->getFieldset('credentials') as $field): ?>
                        <?php if (!$field->hidden): ?>
                        <div class="login-fields"><?php echo $field->label; ?> <?php echo $field->input; ?></div>
                        <?php endif; ?>
                        <?php endforeach; ?>
                        <?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
                        <div class="login-fields">
                            <label id="remember-lbl" for="remember"><?php echo JText::_('JGLOBAL_REMEMBER_ME') ?></label>
                            <input id="remember" type="checkbox" name="remember" class="inputbox ck" value="yes"  alt="<?php echo JText::_('JGLOBAL_REMEMBER_ME') ?>" />
                        </div>
                        <?php endif; ?>
                        <button type="submit" class="button" style="position: absolute; left:-9999px"><?php echo JText::_('JLOGIN'); ?></button>
                        <a class="btnLogin" onclick="$('#com-login').submit();">Log ind</a>
                        <input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('login_redirect_url', $this->form->getValue('return'))); ?>" />
                        <?php echo JHtml::_('form.token'); ?>
                    </fieldset>
                </form>
            </div>
            <div>
                <ul>
                    <li> <a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>"> <?php echo JText::_('COM_USERS_LOGIN_RESET'); ?></a> </li>
                </ul>
            </div>
        </div>
    </div>
</div>
